package com.atguigu04.example.exer4;

/**
 * ClassName: MyArrayTest
 * Package: com.atguigu04.example.exer4
 * Description:
 *
 * @Author BuTang
 * @Create 2023/2/27 20:43
 * @Version 1.0
 */
public class MyArrayTest {
    public static void main(String[] args) {
        int[] arr = new int[]{8,2,5,7,9,32,7,8,9,1,22};
        MyArray my = new MyArray();
        my.sort(arr);//数组排序
        my.print(arr);//数组打印

        //求最大值，最小是，总和，平均数，遍历数组
        System.out.println(my.getMax(arr));
        System.out.println(my.getMin(arr));
        System.out.println(my.getSum(arr));
        System.out.println(my.getAvg(arr));

        //复制数组
        int[] arr1 = my.copy(arr);
        my.print(arr1);

        //数组的查找
        my.linearSearch(arr,2);

    }
}
